package com.yonyougov.cruxtestcase.testcase.organization.agency.myMultversion;


import com.yonyougov.cruxtestcase.basecase.BaseCase;
import com.yonyougov.cruxtestcase.dto.BaseResponseDto;
import com.yonyougov.cruxtestcase.dto.BaseTestReqDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping ("/api/agency/mymultversion/refersave")
@Valid
public class MyAgencyReferSaveController implements BaseCase {
    private final MyAgencyService myAgencyService;

    public MyAgencyReferSaveController(MyAgencyService myAgencyService) {
        this.myAgencyService = myAgencyService;
    }

    @Override
    public String getName() {
        return "预算单位多版本参照保存";
    }

    @Override
    public String getRemark() {
        return "默认查询返回预算单位多版本参照保存";
    }

    @Override
    public BaseResponseDto testcase(BaseTestReqDto baseDto) {
        return null;
    }

    @PostMapping ("/testcase")
    public BaseResponseDto testcase(@RequestBody AgencyTestReqDto baseDto) {
        return myAgencyService.testsavecase(baseDto);
    }

}
